package com.jit.monitor.ui.adapter;

import android.graphics.drawable.GradientDrawable;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jit.monitor.R;
import com.jit.monitor.model.CheckDataManager;
import com.jit.monitor.model.response.CtFrameResponse;

import java.util.List;

/**
 * @author crazyZhangxl on 2018/12/21.
 * Describe:
 */
public class CtDetailAdapter extends BaseQuickAdapter<CtFrameResponse,BaseViewHolder> {
    public CtDetailAdapter(int layoutResId, @Nullable List<CtFrameResponse> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CtFrameResponse item) {
        helper.setText(R.id.tvValue,"相似度:"+item.getMatchValue());
        helper.setText(R.id.tvLeft,item.getLeftCoordinate());
        helper.setText(R.id.tvRight,item.getRightCoordinate());
        helper.setText(R.id.tvObject, String.valueOf(helper.getAdapterPosition()+1));
        String id = item.getId();
        helper.setText(R.id.tvNumber,"物品编号:"+id.substring(0,8));
        helper.addOnClickListener(R.id.tvNumber);
    }
}
